package pers.books.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import pers.books.dao.BuyTypeDao;
import pers.books.entity.BuyType;
import pers.books.service.BuyTypeService;
import pers.books.util.ResultMessage;

/**
 * 
 * BuyTypeServiceImpl
 *
 * @author 姜治昊
 * @time 2018年5月5日 下午11:32:46
 */
@Service
public class BuyTypeServiceImpl implements BuyTypeService {

	@Autowired
	private BuyTypeDao typeDao;
	
	@Override
	public ResultMessage<?> getAllTypes(String nameLike, int page, int rows) {
		// TODO Auto-generated method stub
		List<BuyType> types = typeDao.getAllTypes(nameLike, page, rows);
		return ResultMessage.createSuccessResultMessage(types);
	}

}
